package com.lovely3x.versionchecklibrary;

import android.os.Bundle;

import com.lovely3x.common.activities.CommonActivity;
import com.lovely3x.common.versioncontroller.Version;

/**
 * 找到新版本界面
 * Created by lovely3x on 16-2-18.
 */
public class FoundNewVersionActivity extends CommonActivity {

    public static final String EXTRA_VERSION = "extra.version.obj";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Version version = getIntent().getParcelableExtra(EXTRA_VERSION);
        if (version == null) {
            finish();
            return;
        }
        FoundNewVersionDialog fnvd = new FoundNewVersionDialog();
        Bundle bundle = new Bundle();
        bundle.putParcelable(FoundNewVersionDialog.EXTRA_VERSION, version);
        fnvd.setArguments(bundle);
        fnvd.show(getSupportFragmentManager(), fnvd.toString());
    }
}
